//package com.yuwubao.uav.tool.datasource;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
//
//import javax.sql.DataSource;
//import java.util.HashMap;
//import java.util.Map;
//
//public class DynamicDataSource extends AbstractRoutingDataSource {
////    private static final Logger log = LoggerFactory.getLogger(DynamicDataSource.class);
//
//    @Override
//    protected Object determineCurrentLookupKey() {
////        log.debug("数据源为{}", DataSourceContextHolder.getDB());
//        System.out.println("数据源为{}"+DataSourceContextHolder.getDB());
//
//        return DataSourceContextHolder.getDB();
//    }
//
//}